﻿using System;
using System.Collections.Generic;

namespace Hyt.Core.Security
{
    /// <summary>
    /// 可授权主体
    /// </summary>
    public interface IPrincipal
    {
        /// <summary>
        /// 获取FullId
        /// exp：Administrator:100
        /// </summary>
        /// <returns></returns>
        string GetFullId(IPrincipalResolver resolver);


        /// <summary>
        /// 获取本类里ID
        /// exp: 100
        /// </summary>
        /// <returns></returns>
        Guid GetPrincipalId();

        /// <summary>
        /// 获取类型
        /// exp: Administrator
        /// </summary>
        /// <returns></returns>
        string GetPrincipalType();
        
        /// <summary>
        /// 父级主体
        /// </summary>
        /// <returns></returns>
        List<IPrincipal> GetParents();
    }
}
